<template>
	<router-view v-slot="{ Component }">
    <keep-alive>
      <component :is="Component"  v-if="$route.meta.keepAlive"/>
    </keep-alive>
    <component :is="Component"  v-if="!$route.meta.keepAlive"/>
  </router-view> 
</template>

<script lang="ts">
import { defineComponent, watch } from 'vue';
import { useRoute } from 'vue-router';
import { useTitle } from '/@/utils/setWebTitle';
export default defineComponent({
	name: 'app',
	setup() {
		const route = useRoute();
		const title = useTitle();
		watch(
			() => route.path,
			() => {
				title();
			}
		);
	},
})
</script>
